package com.mapper;

import com.pojo.XiangQing_db;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface XiangQingMapper_db {

    @Select("select * from xiangqing_db")
    List<XiangQing_db> listAll();

    @Select("select * from xiangqing_db where x_kid = #{xKid}")
    XiangQing_db findById(Integer xKid);

    @Insert("insert into xiangqing_db(x_jianjie,x_renqun,x_shouhuo,x_xuzhi,x_kid) values (#{xJianjie},#{xRenqun},#{xShouhuo},#{xXuzhi},#{xKid})")
    Integer add(XiangQing_db xiangQingDb);

    @Update("update xiangqing_db set x_jianjie = #{xJianjie},x_renqun = #{xRenqun},x_shouhuo = #{xShouhuo},x_xuzhi = #{xXuzhi} where x_id = #{xId}")
    Integer update(XiangQing_db xiangQingDb);

    @Delete("delete from xiangqing_db where x_id = #{xId}")
    Integer del(Integer xId);
}
